package com.iwomy.secureplat.platform.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.iwomy.secureplat.common.data.datascope.DataScope;
import com.iwomy.secureplat.platform.entity.AlarmProcessTypeEntity;
import com.iwomy.secureplat.platform.entity.BasicSensorEntity;
import com.iwomy.secureplat.platform.mapper.AlarmProcessTypeMapper;
import com.iwomy.secureplat.platform.service.AlarmProcessTypeService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 报警处理类型
 *
 * @author pig
 * @date 2023-12-18 18:50:44
 */
@Service
public class AlarmProcessTypeServiceImpl extends ServiceImpl<AlarmProcessTypeMapper, AlarmProcessTypeEntity> implements AlarmProcessTypeService {
	@Override
	public List<AlarmProcessTypeEntity> listByScope(AlarmProcessTypeEntity alarmProcessTypeEntity) {
		LambdaQueryWrapper<AlarmProcessTypeEntity> wrapper = Wrappers.lambdaQuery(alarmProcessTypeEntity);
		return this.baseMapper.selectListByScope(wrapper, new DataScope());
	}

	@Override
	public Page pageByScope(Page page, AlarmProcessTypeEntity alarmProcessTypeEntity) {
		LambdaQueryWrapper<AlarmProcessTypeEntity> wrapper = Wrappers.lambdaQuery(alarmProcessTypeEntity);
		return this.baseMapper.selectPageByScope(page, wrapper, new DataScope());
	}
}